
<div id='sidebar'>
  <div class='panel'>
    <div class='header'>
      <span class='col_fade'>关于</span>
    </div>
    <div class='inner'>
      <p>{{siteDes}}</p>

      <p>在这里你可以：</p>
      <ul>
        <li>向别人提出你遇到的问题</li>
        <li>帮助遇到问题的人</li>
        <li>分享自己的知识</li>
        <li>和其它人一起进步</li>
      </ul>
    </div>
  </div>
</div>
<div id='content'>
  <div class='panel'>
    <div class='header'>
      <ul class='breadcrumb'>
        <li><a  routerLinkActive="active" [routerLink]="['/']" >主页</a><span class='divider'>/</span></li>
        <li class='active'>登录</li>
      </ul>
    </div>
    <div class='inner'>
      <form  class='form-horizontal'  #loginForm="ngForm">
        <div class='control-group'>
          <label class='control-label' for='name'>用户名</label>

          <div class='controls'>
            <input class='input-xlarge' id='name' name='name' size='30' [(ngModel)]="user.name" #name="ngModel"  required type='text'/>
            <div *ngIf="name.invalid && (name.dirty || name.touched)"
                 class="alert alert-danger">
              <div *ngIf="name.errors.required">
                用户名必填
              </div>
            </div>
          </div>
        </div>
        <div class='control-group'>
          <label class='control-label' for='pass'>密码</label>

          <div class='controls'>
            <input class='input-xlarge' id='pass' name='pass' size='30' [(ngModel)]="user.pass" #pass="ngModel"  required  type='password'/>
            <div *ngIf="pass.invalid && (pass.dirty || pass.touched)"
                 class="alert alert-danger">
              <div *ngIf="pass.errors.required">
                请输入密码
              </div>
            </div>
          </div>
        </div>
      </form>
        <div class='form-actions'>
          <input type='button' class='span-primary' value='登录' [disabled]="!loginForm.form.valid" (click)="login()" />
          <a href="api/auth/github">
            <span class="span-info">
              通过 GitHub 登录
            </span>
          </a>
          <a id="forgot_password" routerLinkActive="active" [routerLink]="['api/search_pass']" >忘记密码了?</a>
        </div>


    </div>
  </div>
</div>

